package ah.cron;

import java.util.TimerTask;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;


public class PrintHello extends TimerTask {
	private String message;
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Resource rs = new ClassPathResource("cron/application.xml");
		BeanFactory bf = new XmlBeanFactory(rs);
		bf.getBean("timerFactory");
	}

	@Override
	public void run() {
		System.out.println(message);
		
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	

}
